<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>web2py.gluon.rocket</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;web2py ::
        <a href="web2py.gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;rocket
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="web2py.gluon.rocket-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module rocket</h1><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html">source&nbsp;code</a></span><br /><br />
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.NullHandler-class.html" class="summary-name">NullHandler</a><br />
      A Logging handler to prevent library errors.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Connection-class.html" class="summary-name">Connection</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Rocket-class.html" class="summary-name">Rocket</a><br />
      The Rocket class is responsible for handling threads and 
        accepting and dispatching connections.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Monitor-class.html" class="summary-name">Monitor</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.ThreadPool-class.html" class="summary-name">ThreadPool</a><br />
      The ThreadPool class is a container class for all the worker 
        threads.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.SSLError-class.html" class="summary-name">SSLError</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Headers-class.html" class="summary-name">Headers</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.FileWrapper-class.html" class="summary-name">FileWrapper</a><br />
      Wrapper to convert file-like objects to iterables
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.Worker-class.html" class="summary-name">Worker</a><br />
      The Worker class is a base class responsible for receiving 
        connections and (a subclass) will run an application to process the
        the connection
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.SocketTimeout-class.html" class="summary-name">SocketTimeout</a><br />
      Exception for when a socket times out between requests.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.BadRequest-class.html" class="summary-name">BadRequest</a><br />
      Exception for when a client sends an incomprehensible 
        request.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.SocketClosed-class.html" class="summary-name">SocketClosed</a><br />
      Exception for when a socket is closed by the client.
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.ChunkedReader-class.html" class="summary-name">ChunkedReader</a>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket.WSGIWorker-class.html" class="summary-name">WSGIWorker</a>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket-module.html#b" class="summary-sig-name">b</a>(<span class="summary-sig-arg">val</span>)</span><br />
      Convert string/unicode/bytes literals into bytes.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#b">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="web2py.gluon.rocket-module.html#u" class="summary-sig-name">u</a>(<span class="summary-sig-arg">val</span>,
        <span class="summary-sig-arg">encoding</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">us-ascii</code><code class="variable-quote">'</code></span>)</span><br />
      Convert bytes into string/unicode.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#u">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="CherryPyWSGIServer"></a><span class="summary-sig-name">CherryPyWSGIServer</span>(<span class="summary-sig-arg">bind_addr</span>,
        <span class="summary-sig-arg">wsgi_app</span>,
        <span class="summary-sig-arg">numthreads</span>=<span class="summary-sig-default">10</span>,
        <span class="summary-sig-arg">server_name</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">max</span>=<span class="summary-sig-default">-1</span>,
        <span class="summary-sig-arg">request_queue_size</span>=<span class="summary-sig-default">5</span>,
        <span class="summary-sig-arg">timeout</span>=<span class="summary-sig-default">10</span>,
        <span class="summary-sig-arg">shutdown_timeout</span>=<span class="summary-sig-default">5</span>)</span><br />
      A Cherrypy wsgiserver-compatible wrapper.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#CherryPyWSGIServer">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_method"></a><span class="summary-sig-name">get_method</span>(<span class="summary-sig-arg">method</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#get_method">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="VERSION"></a><span class="summary-name">VERSION</span> = <code title="'1.0.6a'"><code class="variable-quote">'</code><code class="variable-string">1.0.6a</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SERVER_NAME"></a><span class="summary-name">SERVER_NAME</span> = <code title="'www'"><code class="variable-quote">'</code><code class="variable-string">www</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SERVER_SOFTWARE"></a><span class="summary-name">SERVER_SOFTWARE</span> = <code title="'Rocket 1.0.6a'"><code class="variable-quote">'</code><code class="variable-string">Rocket 1.0.6a</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="HTTP_SERVER_SOFTWARE"></a><span class="summary-name">HTTP_SERVER_SOFTWARE</span> = <code title="'Rocket 1.0.6a Python/2.5.2'"><code class="variable-quote">'</code><code class="variable-string">Rocket 1.0.6a Python/2.5.2</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="BUF_SIZE"></a><span class="summary-name">BUF_SIZE</span> = <code title="16384">16384</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="POLL_TIMEOUT"></a><span class="summary-name">POLL_TIMEOUT</span> = <code title="1">1</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="IS_JYTHON"></a><span class="summary-name">IS_JYTHON</span> = <code title="False">False</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="IGNORE_ERRORS_ON_CLOSE"></a><span class="summary-name">IGNORE_ERRORS_ON_CLOSE</span> = <code title="set([103, 104])"><code class="variable-group">set([</code>103<code class="variable-op">, </code>104<code class="variable-group">])</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DEFAULT_LISTEN_QUEUE_SIZE"></a><span class="summary-name">DEFAULT_LISTEN_QUEUE_SIZE</span> = <code title="5">5</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DEFAULT_MIN_THREADS"></a><span class="summary-name">DEFAULT_MIN_THREADS</span> = <code title="10">10</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="DEFAULT_MAX_THREADS"></a><span class="summary-name">DEFAULT_MAX_THREADS</span> = <code title="1024">1024</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket-module.html#DEFAULTS" class="summary-name">DEFAULTS</a> = <code title="{'LISTEN_QUEUE_SIZE': 5, 'MAX_THREADS': 1024, 'MIN_THREADS': 10}"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">LISTEN_QUEUE_SIZE</code><code class="variable-quote">'</code><code class="variable-op">: </code>5<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">MAX_THREADS</code><code class="variable-quote">'</code><code class="variable-op">: </code>1024<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">MIN_</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="PY3K"></a><span class="summary-name">PY3K</span> = <code title="False">False</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="has_ssl"></a><span class="summary-name">has_ssl</span> = <code title="False">False</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="poll"></a><span class="summary-name">poll</span> = <code title="1">1</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="log"></a><span class="summary-name">log</span> = <code title="logging.getLogger('Rocket.Errors.ThreadPool')">logging.getLogger('Rocket.Errors.ThreadPool')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="re_SLASH"></a><span class="summary-name">re_SLASH</span> = <code title="re.compile(r'(?i)%2F')">re.compile(r'<code class="re-flags">(?i)</code>%2F')</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket-module.html#LOG_LINE" class="summary-name">LOG_LINE</a> = <code title="'%(client_ip)s - &quot;%(request_line)s&quot; - %(status)s %(size)s'"><code class="variable-quote">'</code><code class="variable-string">%(client_ip)s - &quot;%(request_line)s&quot; - %(status)s %(</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket-module.html#RESPONSE" class="summary-name">RESPONSE</a> = <code title="'''HTTP/1.1 %s
Content-Length: %i
Content-Type: %s

%s
'''"><code class="variable-quote">'</code><code class="variable-string">HTTP/1.1 %s\nContent-Length: %i\nContent-Type: %s\</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="NEWLINE"></a><span class="summary-name">NEWLINE</span> = <code title="'''\r
'''"><code class="variable-quote">'</code><code class="variable-string">\r\n</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="HEADER_RESPONSE"></a><span class="summary-name">HEADER_RESPONSE</span> = <code title="'''HTTP/1.1 %s\r
%s'''"><code class="variable-quote">'</code><code class="variable-string">HTTP/1.1 %s\r\n%s</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="web2py.gluon.rocket-module.html#BASE_ENV" class="summary-name">BASE_ENV</a> = <code title="{'SERVER_NAME': 'www',
 'wsgi.errors': &lt;epydoc.docintrospecter._DevNull instance at 0x2b78276\
bef80&gt;,
 'wsgi.file_wrapper': &lt;class web2py.gluon.rocket.FileWrapper at 0x122b\
350&gt;,
 'wsgi.multiprocess': False,
 'wsgi.run_once': False,
 'wsgi.version': (1, 0)}"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">SERVER_NAME</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">www</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">wsgi.errors</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;epydoc.docin<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="b"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">b</span>(<span class="sig-arg">val</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#b">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Convert string/unicode/bytes literals into bytes.  This allows for the
  same code to run on Python 2.x and 3.x.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="u"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">u</span>(<span class="sig-arg">val</span>,
        <span class="sig-arg">encoding</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">us-ascii</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="web2py.gluon.rocket-pysrc.html#u">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Convert bytes into string/unicode.  This allows for the same code to 
  run on Python 2.x and 3.x.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="DEFAULTS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">DEFAULTS</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">LISTEN_QUEUE_SIZE</code><code class="variable-quote">'</code><code class="variable-op">: </code>5<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">MAX_THREADS</code><code class="variable-quote">'</code><code class="variable-op">: </code>1024<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">MIN_THREADS</code><code class="variable-quote">'</code><code class="variable-op">: </code>10<code class="variable-group">}</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="LOG_LINE"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">LOG_LINE</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'</code><code class="variable-string">%(client_ip)s - &quot;%(request_line)s&quot; - %(status)s %(size)s</code><code class="variable-quote">'</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="RESPONSE"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">RESPONSE</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'''</code><code class="variable-string">HTTP/1.1 %s</code>
<code class="variable-string">Content-Length: %i</code>
<code class="variable-string">Content-Type: %s</code>
<code class="variable-string"></code>
<code class="variable-string">%s</code>
<code class="variable-string"></code><code class="variable-quote">'''</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="BASE_ENV"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">BASE_ENV</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">SERVER_NAME</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">www</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">wsgi.errors</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;epydoc.docintrospecter._DevNull instance at 0x2b78276<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
bef80&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">wsgi.file_wrapper</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;class web2py.gluon.rocket.FileWrapper at 0x122b<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
350&gt;<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">wsgi.multiprocess</code><code class="variable-quote">'</code><code class="variable-op">: </code>False<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">wsgi.run_once</code><code class="variable-quote">'</code><code class="variable-op">: </code>False<code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">wsgi.version</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-group">(</code>1<code class="variable-op">, </code>0<code class="variable-group">)</code><code class="variable-group">}</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="web2py.gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Wed Oct 13 19:44:38 2010
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
